package com.example.blog.mapper;

import com.example.blog.model.UserInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper {
    @Select("select * from user where user_name=#{username} and delete_flag=0")   //根据用户名来查询信息
    UserInfo SelectByName(String username);

    /**
     * 根据用户id来查询信息
     */

    @Select("select * from user where id=#{id} and delete_flag=0")
    UserInfo SelectById(Integer id);
}
